import React, { Component } from 'react'
import Dialog from './Dialog'
import noop from 'lodash/noop'

export default class Alert extends Component {
    constructor(props) {
        super(props)
    }

    render() {
        return (
            <Dialog title={this.props.title}
                    on={this.props.on}
                    message={this.props.message}
                    ok={this.props.ok}
                    okLabel={this.props.okLabel}
                    onDismiss={this.props.onDismiss}
                    cancel={null}/>
        )
    }
}

Alert.defaultProps = {
    on: false,
    title: '',
    message: '',
    ok: noop,
    okLabel: '确定',
    onDismiss: noop
}